import { createRouter, createWebHashHistory } from 'vue-router'
import Index from "../views/index.vue";
import Home from "../views/home.vue";
import Strategy from "../views/strategy.vue";
import Personal from "../views/personal.vue";
import Ticketing from "../views/ticketing.vue";
import Map from "../views/map.vue";
import Switchover from "../views/switchover.vue";
import Foreshow from "../views/foreshow.vue";
import Active from "../views/active.vue";
import Clock from "../views/clock.vue";
import Promotion from "../views/promotion.vue";
import Withdraw from "../views/withdraw.vue";
import Group from "../views/group.vue";
import Particulars from "../views/particulars.vue";

const routes = [
   {
      path: '/home/:id',
      name: 'home',
      component: Home,
      children: [
         {
            path: '/strategy',
            name: 'strategy',
            component: Strategy
         }, {
            path: '/personal',
            name: 'personal',
            component: Personal
         }, {
            path: '/',
            name: 'index',
            component: Index,

         }
      ]
   }, {
      path: '/ticketing',
      name: 'ticketing',
      component: Ticketing
   }, {
      path: '/map',
      name: 'map',
      component: Map
   },{
      path: '/switchover',
      name: 'switchover',
      component: Switchover
   },{
      path: '/foreshow',
      name: 'foreshow',
      component: Foreshow
   },{
      path: '/active',
      name: 'active',
      component: Active
   },{
      path: '/clock',
      name: 'clock',
      component: Clock
   },{
      path: '/promotion',
      name: 'promotion',
      component: Promotion
   },{
      path: '/withdraw',
      name: 'withdraw',
      component: Withdraw
   },{
      path: '/group',
      name: 'group',
      component: Group
   },{
      path: '/particulars',
      name: 'particulars',
      component: Particulars
   }
]

const router = createRouter({
   routes,
   history: createWebHashHistory(process.env.BASE_URL),
})

export default router;